package com.api.shopapi.config;

import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;

public class BarcodePayConfig {


    // 1.商户appid,使用商户自己的appid即可
    public static String APPID = "2021002115693830";
//    public static String APPID = "2021000120612802";//沙箱

    //2.App私钥
    public static String APP_PRIVATE_KEY = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDCvffkxPJE3veLwb4kUARYGz+U+JxsVBvsEO8SSmhzXDSs9mU+hR8GKGh45q/j4hVp/gAxyLE/to48K1TmwWKIDqu4NknfkXDjnJe7bC/MABftLkC13aYrmm8+nzsZGQYgvhY8V0hEp/2H/0Kix2YLX5/h/J8LGrJXckRZJBM2FEfneonF4JQWhL3n2K3an/Ud2WsdFFMTFuRpKP84CreJIyUz/CQelA/mvp9rRXu82CgXXKvj/V48Y2VdDr7cT1m1ZvYC6e1wSAh3KH9U9mPEOF8iIX2fTgD7aQwEDgZuJ5PbGB0a7nCebanV2PwbfbTAfv6HcfHScJtlIFdngisDAgMBAAECggEBAJ1lfvs2tv01HOynLbAZwDkZ5NzZx0vC+0JkOWYWH6/FgYmeKBxM6dNHS5EUGmtb6qTdN3kFVUVCnllBSICtIp8HBIGB11lMKuq8QOKpwUPne28mqASV3d12F52Mgu55DDvghwZEIVPkVwTZKhl4giCFLCsxy7Xk4OnOoDFP9/sHI4iD7gyIf1kFls56gw5oVRRjJ5PtTxsNOb1RgtCRD+jEbw9uImu09tpMaRztbF4TGltXjqEBelX0LJm4TqsM9iWZ5f0zSGxH2pwt1wq1ej5jF2WabGvQ8eVMT7IsyMKWDEksH+XghLBt9TYCcI4WWvR3DC+nCQmVILomP7ewtwECgYEA/QqFpHpQ3Gjs7FxQbDPKrX6Xkvy/Y6yTmC93sSRMC9ZaV6/WpCCvo2QDSQxCVM4ZqQtouMZYwRB9XUFz1aWH18tpb+BaJL149i2fK+yXS+p5EiBBN0QvyOWjcSBnnVjj3NJvbtcxhUU/w9uH4kQPP314wlLpWGc4rta1Q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T9PTY5bA8p+YB7kG2vfvbPoBx+f5p9GuE1AP0TfxMjVLixtNoLwqQGqnDrkQIDAQAB";
    // 4.服务器异步通知页面路径 需http://或者https://格式的完整路径，必须外网可以正常访问，可以使用natapp进行外网映射



    // 6.请求支付宝的网关地址,此处为沙箱测试地址，正式环境替换即可
    public static String URL = "https://openapi.alipay.com/gateway.do";
//    public static String URL = "https://openapi.alipaydev.com/gateway.do";//沙箱

    // 7.编码
    public static String CHARSET = "utf-8";

    // 8.返回格式
    public static String FORMAT = "json";

    // 9.加密类型
    public static String SIGNTYPE = "RSA2";



    public static AlipayClient initClient() {
        AlipayClient alipayClient = new DefaultAlipayClient(URL, APPID, APP_PRIVATE_KEY, FORMAT, CHARSET,ALIPAY_PUBLIC_KEY,SIGNTYPE);
        return alipayClient;
    }
}
